// Copyright (c) 2007 Alistair Jones
// This program is made available under the terms of the MIT License.
package org.hypirinha.html.codegen;

import java.io.PrintStream;

public class Constructor implements Member {
    private String className;
    private String parameters;
    private String methodBody;

    public Constructor(String className, String parameters, String methodBody) {
        this.className = className;
        this.parameters = parameters;
        this.methodBody = methodBody;
    }

    public void printTo(PrintStream printStream) {
        printStream.println();
        printStream.println("    public " + className + "(" + parameters + ") {");
        printStream.println("        " + methodBody);
        printStream.println("    }");
    }

    public String getMethodBody() {
        return methodBody;
    }
}